package org.example.utils;

public class RedisKeyUtil {

    /**
     * redis的key
     */
    public static final String CODE_KEY = "code:%s";


    /**
     * redis的token的key
     */
    public static final String USER_LOGIN_TOKEN_KEY = "USER_LOGIN_TOKEN:%s";

    /**
     * 模型通道总下标的key
     */
    public static final String CHANNEL_MODEL_TOTAL_INDEX_KEY_FORMAT = "channel:%d:totalIndex";
    /**
     * 模型通道的当前下标key
     */
    public static final String CHANNEL_MODEL_CURRENT_INDEX_KEY_FORMAT = "channel:%d:model:currentIndex";

    /**
     * 单位时间模型异常统计下标key
     */
    public static final String MODEL_ERROR_INDEX_KEY_FORMAT = "model-%s-error_number";

    /**
     * 通道的当前下标key
     */
    public static final String CHANNEL_CURRENT_INDEX_KEY_FORMAT = "channel:%s:%s:%s:currentIndex";

    /**
     * 模型逆向规则下标key
     */
    public static final String MODEL_REVERSE_INDEX_KEY_FORMAT = "rule-%s-model_reverse";


    /**
     * 模型逆向限制模型恢复key
     */
    public static final String MODEL_REVERSE_RENEW_KEY = "rule-model-reverse_renew";

    /**
     * 模型限流规则下标key
     */
    public static final String MODEL_LIMIT_INDEX_KEY_FORMAT = "rule-%s-model_limit";

    /**
     * 用于保存 通道里面的渠道的list
     */
    public static final String CHANNEL_MODEL_LIST = "channel-model:%s:list";

    /**
     * 用于保存 通道的list
     */
    public static final String CHANNEL_LIST = "channel:%s:%s:%s:list";


    public static final String MODEL_ERROR_KEY = "errorModels";

    public static final String MODEL_ERROR_SEND_MAIL = "model:error:sendMail:%d";

    /**
     * 用户的UserToken在 缓存中的值
     */
    public static final String USER_TOKEN_KEY = "user:token:%s";


    /**
     * 渠道缓存key
     */
    public static final String MODEL_CONFIG_KEY = "model:config:%s";

}
